/*
 * PyGeoEquilibrator.cpp
 *
 *  Created on: Dec 28, 2011
 *      Author: allan
 */

#include "PyGeoEquilibrator.h"

// Eigen includes
#include <Eigen/Core>
using namespace Eigen;

// GeoReact includes
#include <GeoReact.h>

// Boost includes
#include <boost/python.hpp>
using namespace boost::python;

void export_GeoEquilibrator()
{
	std::tuple<unsigned, bool>
		(GeoEquilibrator::*EquilibrateWithTPn)(double, double, VectorXd&) = 
			&GeoEquilibrator::Equilibrate;
	
	std::tuple<unsigned, bool>
		(GeoEquilibrator::*EquilibrateWithGeoState)(GeoState&) = 
			&GeoEquilibrator::Equilibrate;
	
	class_<GeoEquilibrator>("GeoEquilibrator")
		.def(init<>())
		
		.def(init<const GeoEquilibrator&>())
		
		.def(init<const EquilibriumSystem&>())
				
		.def("ImposeSpeciesMoles",
			&GeoEquilibrator::ImposeSpeciesMoles)
		
		.def("ImposeSpeciesMass",
			&GeoEquilibrator::ImposeSpeciesMass)
		
		.def("ImposeSpeciesActivity",
			&GeoEquilibrator::ImposeSpeciesActivity)
		
		.def("ImposeElementMoles",
			&GeoEquilibrator::ImposeElementMoles)
		
		.def("ImposeAcidity",
			&GeoEquilibrator::ImposeAcidity)
		
		.def("ImposePartialPressureGas",
			&GeoEquilibrator::ImposePartialPressureGas)
		
		.def("ImposePhaseChargeBalance",
			&GeoEquilibrator::ImposePhaseChargeBalance)
		
		.def("Equilibrate",
			EquilibrateWithTPn)
		
		.def("Equilibrate",
			EquilibrateWithGeoState);
}
